//
//  TabbarViewController.m
//  PlayAllDay
//
//  Created by 小康 on 16/2/27.
//  Copyright © 2016年 康超军. All rights reserved.
//

#import "TabbarViewController.h"
#import "ActivityTableViewController.h"
#import "ContactTableViewController.h"
#import "MessageTableViewController.h"
#import "UserTableViewController.h"
@interface TabbarViewController ()

@end

@implementation TabbarViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.backgroundColor = [UIColor redColor];
        
    ActivityTableViewController *activityVC = [[ActivityTableViewController alloc] init];
    
    activityVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"活动" image:[UIImage imageNamed:@"iconfont-dibuhuodong"] tag:1001];
    
    UINavigationController *nav1 = [[UINavigationController alloc] initWithRootViewController:activityVC];
    
    
    MessageTableViewController *messageVC = [MessageTableViewController new];
    
    messageVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"消息" image:[UIImage imageNamed:@"iconfont-xiaoxi"] tag:1002];
    
    UINavigationController *nav2 = [[UINavigationController alloc] initWithRootViewController:messageVC];
    
    ContactTableViewController *contactVC = [[ContactTableViewController alloc] init];
    
    contactVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"好友" image:[UIImage imageNamed:@"iconfont-lianxiren"] tag:1003];
    
     UINavigationController *nav3 = [[UINavigationController alloc] initWithRootViewController:contactVC];
    
    UserTableViewController *userVC = [UserTableViewController new];
    
    userVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"我的" image:[UIImage imageNamed:@"iconfont-geren-copy"] tag:1004];
    
    UINavigationController *nav4 = [[UINavigationController alloc] initWithRootViewController:userVC];
    
    self.viewControllers = @[nav1,nav2,nav3,nav4];



}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
